
{foreach $search as $key=>$item }
    {if ($item.type == 'text')}
        <div class="layui-input-inline layui-col-md2">
            <input type="text" name="{$item.field}" placeholder="{$item.desc}" value="{$item.default ?? ''}" autocomplete="off" class="layui-input">
        </div>
    {elseif($item.type == 'select')}
    <div class="layui-input-inline layui-col-md2">
        <select id="{$item.field}" name="{$item.field}" lay-filter="{$item.field}">
            <option value="">{$item.desc}</option>
            {foreach $item.option as $k => $val}

            {if condition="isset($item.default) AND $item.default==$k "}
               <option value="{$k}" selected>{$val}</option>
            {else /}
               <option value="{$k}">{$val}</option>
            {/if}

            {/foreach}
        </select>
        <div class="layui-unselect layui-form-select">
            <div class="layui-select-title">
                <input type="text" placeholder="{$item.desc}" value="" readonly="" class="layui-input layui-unselect" name="">
                <i class="layui-edge"></i>
            </div>
        </div>
    </div>
    {elseif($item.type == 'time')}
    <div class="layui-input-inline layui-col-md2">
        <div class="layui-input-inline">
            <input type="text" class="layui-input" id="time_start" name="start_{$item.field}" value="{$item.start_time ?? ''}" placeholder="开始{$item.desc}">
        </div>
    </div>
    <div class="layui-input-inline layui-col-md2">
        <div class="layui-input-inline">
            <input type="text" class="layui-input" id="time_end" name="end_{$item.field}" value="{$item.end_time ?? ''}" placeholder="结束{$item.desc}">
        </div>
    </div>
    {elseif($item.type == 'hidden')}
        <input type="hidden" name="{$item.field}" value="{$item.default ?? ''}" autocomplete="off" class="layui-input">
    {elseif($item.type == 'range_time')}
        <div class="layui-inline">
            <label class="layui-form-label" style="width: auto">{$item.desc}</label>
            <div class="layui-input-inline" style="width: 300px">
                <input type="text" class="layui-input" style="width: 300px" name="{$item.field}" id="range_time" placeholder="开始 到 结束" value="{$item.default ?? ''}">
            </div>
        </div>
    {/if}
{/foreach}
